package com.utils;

import java.io.InputStream;

import android.content.Context;
import android.content.res.AssetManager;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;

public class Res {
    public static Bitmap loadAsset(Context ctx, String file) {
        AssetManager mngr = ctx.getAssets();
        InputStream in = null;
        try {
            in = mngr.open(file);
        } catch (Exception e) {
            e.printStackTrace();
        }

        Bitmap bitmap = BitmapFactory.decodeStream(in, null, null);
        return bitmap;
    }
}
